﻿{% extends site.theme|stringformat:"s/include/base.html" %}﻿{% load tags %}
{% block title %}{% endblock %}
{% block script %}<link rel="stylesheet" href="/static/{{site.theme}}/css/PicSwitch.css" type="text/css" />
<script src="/static/{{site.theme}}/js/PicSwitch.js" type="text/javascript"></script>{% endblock %}{% block mainer %}
<div style="float:left; width:570px;">{% PicSwitch 1 %}</div>
<div style="float:right; width:400px;">{% ArticleList A1 8 26 listtb 公告栏  %}</div>
<div class="clear"></div>
<div style="margin-bottom: 5px;"><img src="/static/{{site.theme}}/images/banner-01.gif"></div>
<div class="clear"></div>
{% ProductShow prd %}
<div class="clear"></div>
<table style="width:100%;">
  <tr>
    <td>{% ProductList P1 5 26 listtb 产品列表  %}</td>
    <td style="width:5px;"></td>
    <td>{% ProductList P2 5 26 listtb 产品列表  %}</td>
    <td style="width:5px;"></td>
    <td>{% ProductList P3 5 26 listtb 产品列表  %}</td>
  </tr>
</table>
<script type="text/javascript">
<!-- 
//添加事件响应函数的函数，与本效果无关
function addEventSimple(obj,evt,fn){if(obj.addEventListener){obj.addEventListener(evt,fn,false);}else if(obj.attachEvent){obj.attachEvent('on'+evt,fn);}}
addEventSimple(window,'load',initScrolling);
//保存想要滚动的容器
var interval = 30;
var scrollingBox = $('#scrollDiv');
scrollingBox.bind({
	mouseover:function(){clearInterval(scrollingInterval);},
	mouseout:function(){scrollingInterval = setInterval("scrolling()",interval);}
	});
var scrollingInterval;
//用于记录是否“滚到头”过一次
var reachedRight=false;
//记录第一次滚到头时候的scrollLeft
var right;
//初始化滚动效果
function initScrolling(){scrollingInterval = setInterval("scrolling()",interval);}
//滚动效果
function scrolling(){
	//开始滚动,origin是原来scrollLeft
	var origin = scrollingBox[0].scrollLeft++;
	//如果到头了
	if(origin == scrollingBox[0].scrollLeft){
		//如果是第一次到头
		if(!reachedRight){
			$('#scrollDivList').append($('#scrollDivList').html())
			reachedRight=true;
			right=origin;
		}else{
			//已经到头过，只需回复头接尾的效果
			scrollingBox[0].scrollLeft=right;
		}
	}
}
//-->
</script>
{% endblock %}